package com.coc.core.utils;

import java.util.ArrayList;
import java.util.List;

/**
 * 相关的字符串操作
 */
public class StringRelaUtils {
    public static List<String> strToList(String str){
        List<String> res = new ArrayList<>();
        String[] split =null;
        if (str.contains(",")){
            split = str.split(",");
            for (String sp:split){
                res.add(sp);
            }
        }else if (str.contains(";")){
            split = str.split(";");
            for (String sp:split){
                res.add(sp);
            }
        }else {
            res.add(str);
        }

        return res;
    }
}
